Skip to content

Add --debug option to show exec_cmd and run_cmd commands#373

Merged
ericcurtin merged 1 commit intocontainers:mainfrom
rhatdan:push
Oct 25, 2024
Merged

Add --debug option to show exec_cmd and run_cmd commands#373
ericcurtin merged 1 commit intocontainers:mainfrom
rhatdan:push

Conversation

@rhatdan
Copy link
Member

@rhatdan rhatdan commented Oct 25, 2024

Also fixed a bug I found when testing pulling a bogus image.

Hugginface pulls should have a similar error, but currently we execute the command line and it blows up. When we convert to using internal http we need to catch pulling a bogus image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
print(*args)
def exec_cmd(args, stderr=True, debug=False):
if debug:
perror("exec_cmd: ", *args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably do

    if debug:
        stderr = True
        perror("exec_cmd: ", *args)

but that can be for another PR.

@ericcurtin ericcurtin merged commit 883b2a8 into containers:main Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants